import Vue from 'vue'
import Router from 'vue-router'

const home = () => import('@/views/Home').then(m => m.default)
const login = () => import('@/views/Login').then(m => m.default)

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect: 'home'
    },
    // 主页
    {
      path: '/home',
      name: 'home',
      component: home
    },
    // 登陆页
    {
      path: '/login',
      name: 'login',
      component: login
    }
  ]
})
